package com.leizi.igym.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leizi.igym.domain.Plan;
import com.leizi.igym.dto.PlanAddDTO;
import com.leizi.igym.dto.PlanDTO;
import com.leizi.igym.dto.PlanSearchDTO;

import java.io.IOException;
import java.util.List;

/**
* @author PC
* @description 针对表【t_plan】的数据库操作Service
* @createDate 2024-04-28 10:24:17
*/
public interface PlanService extends IService<Plan> {

    boolean save(PlanAddDTO dto);

    boolean delete(Long id);

    boolean update(PlanDTO dto);

    Plan getPlanById(Long id);

    boolean changeStatus(Long id, Integer status);

    List<Plan> getPlanByUserId(Long userId);

    List<Plan> searchFromES(PlanSearchDTO searchText) throws IOException;
}
